package com.wxproject.demo.Mapper;

import com.wxproject.demo.Entity.AO.FolderCreateAO;
import com.wxproject.demo.Entity.Model.UpLoadFileDO;
import com.wxproject.demo.Entity.VO.*;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import java.util.List;

/**
 * @author zqf
 * @date 2021/4/11 22:19
 * @description
 */
@Mapper
@Repository
public interface UserFileMapper {
    Integer uploadFile(UpLoadFileDO userFile);

    List<UpLoadFileVO> getMyFileList(String userId);

    Integer deleteFileById(@Param("userId")String userId,@Param("id") String id,@Param("date") String date);

    Integer publicFile(@Param("id") String id,@Param("userId") String userId,@Param("date") String date);

    List<UpLoadFileVO> getPublicFile(String userId);

    Integer alterFilePublic(@Param("userId") String userId,@Param("id") String id, @Param("state") Integer state, @Param("date") String date);

    List<CarouselImgVO> getCarouselImg();

    Integer delCarouselImg(@Param("id") String id,@Param("date") String date);

    List<CarouselAdminVO> getAdminCarouselImg();

    Integer createFolder(FolderCreateAO folderCreateAO);

    List<FolderVO> getMyFolder(String userId);

    List<FolderVO> getNextFolder(String id);

    List<UpLoadFileVO> getNextFile(String id);

    List<FolderVO> getNextFolderByName(@Param("name") String name,@Param("userId") String userId);

    List<Object> getNextFileByName(@Param("name") String name,@Param("pageIndex")Integer pageIndex,@Param("pageSize")Integer pageSize);

    List<Object> getAllPublicFile(@Param("pageIndex") Integer pageIndex,@Param("pageSize") Integer pageSize);

    int uploadPublicFile(UpLoadFileDO userFile);

}
